package com.han.hotelplat.dao.hotelmanager;


import java.util.List;

import org.springframework.stereotype.Repository;

import com.han.hotelplat.comm.base.BaseDAO;
import com.han.hotelplat.pojo.hotelmanager.Hotelmanager;

@Repository
public class HotelmanagerDao extends BaseDAO<Hotelmanager>{
	/**
	 * 
		 * @description	通过手机号查询用户
		 * @author  han1088
		 * @param phone
		 * @return
	 */
	public Hotelmanager findByPhone(String phone) {
		String hql = "from Hotelmanager where tel='"+phone+"'"; 
		List<Hotelmanager> list = findByHQL(hql);
		return list.size()>0?list.get(0):null;
	}

	public Hotelmanager findByUserid(String userid) {
		String hql = "from Hotelmanager where userid='"+userid+"'"; 
		List<Hotelmanager> list = findByHQL(hql);
		return list.size()>0?list.get(0):null;
	}

}
